{% extends 'layout.html.twig' %}
{% do script(['libs/jquery-validation.js','libs/iframe-resizer-contentWindow.js',], 500) %}

{% block body %}
  <div class="tab-content" id="iframe-content">
    <div class="tab-pane js-course-tasks-pane active js-step2-view">
      <form class="form-horizontal" id="step2-form" >
        <div class="form-group">
          <div class="col-sm-2 control-label">
          <label for="title" class="control-label-required">{{ 'course.plan_task.activity_manage.title_name'|trans }}</label>
          </div>
          <div class="col-sm-10">
            <input id="title" class="form-control" type="text" name="title" value="{{ activity.title|default('') }}" >
          </div>
        </div>

        {% block activity_content %}
        {% endblock %}
      </form>
    </div>
    <div class="tab-pane js-course-tasks-pane js-step3-view">
      <form class="form-horizontal" id="step3-form" >
        {% block activity_finish %}
        {% endblock %}

        {#{% set task = data('TaskByActivity', {courseId: activity.fromCourseId|default(0), activityId: activity.id|default(0)}) %}
        <div class="form-group">
          <div class="col-sm-10 col-sm-offset-2 radios">
            <label>
              <input type="checkbox" name="isOptional" value="1" {% if task.isOptional|default(false) or ( task is empty and optionalDefault|default(0)) %} checked {% endif %}>
               {{'course.plan_task.activity_manage.setup_is_option'|trans}}
            </label>
              <span class="color-gray">{{'course.plan_task.activity_manage.setup_is_option_tips'|trans({'%taskName%':setting('course.task_name')|default('admin.setting_course.task'|trans)})}}</span>
          </div>
        </div>
        #}
      </form>
    </div>
  </div>
{% endblock %}
